ResourceDownloadFile Method (String, String, Int32) |
Downloads data from a resource with the specified URI (address) to a local file.
Namespace:
Independentsoft.Webdav
Assembly:
Independentsoft.Webdav (in Independentsoft.Webdav.dll) Version: 1.0.700.18437
Syntaxpublic FileDownload DownloadFile(
string address,
string fileName,
int bufferSize
)
Public Function DownloadFile (
address As String,
fileName As String,
bufferSize As Integer
) As FileDownload
Parameters
- address
- Type: SystemString
The URI that identifies the resource. - fileName
- Type: SystemString
The path of the local file to receive the data. - bufferSize
- Type: SystemInt32
The buffer size. Default value is 8192 bytes.
Return Value
Type:
FileDownload
Examples
The following example demonstrates how to use this method:
public void Download()
{
resource.DownloadProgress += new DownloadProgressEventHandler(DownloadProgress);
resource.DownloadFile(remoteFile, localFile);
}
private void DownloadProgress(Object sender,ProgressEventArgs e)
{
Console.WriteLine(e.Progress);
}
See Also